<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<title>后台管理系统——修改部门</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
	<meta http-equiv="description" content="This is my page" />
	<link href="${ctx}/css/back/css.css" type="text/css" rel="stylesheet" />
	<link rel="stylesheet" type="text/css" href="${ctx}/js/ligerUI/skins/Aqua/css/ligerui-dialog.css"/>
	<link href="${ctx}/js/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="${ctx }/js/jquery.form.js"></script>
    <script type="text/javascript" src="${ctx }/js/jquery-migrate-1.2.1.js"></script>
	<script src="${ctx}/js/ligerUI/js/core/base.js" type="text/javascript"></script>
	<script src="${ctx}/js/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script> 
	<script src="${ctx}/js/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
	<script src="${ctx}/js/ligerUI/js/plugins/ligerResizable.jss" type="text/javascript"></script>
	<link href="${ctx}/css/pager.css" type="text/css" rel="stylesheet" />
	<script type="text/javascript">
//	 $(function(){
//	    	/** 部门表单提交 */
//			$("#deptForm").submit(function(){
//				var name = $("#name");
//				var remark = $("#remark");
//				var msg = "";
//				if ($.trim(name.val()) == ""){
//					msg = "部门名称不能为空！";
//					name.focus();
//				}else if ($.trim(remark.val()) == ""){
//					msg = "详细描述不能为空！";
//					remark.focus();
//				}
//				if (msg != ""){
//					$.ligerDialog.error(msg);
//					return false;
//				}else{
//					return true;
//				}
//				$("#deptForm").submit();
//			});
//	    });
//		function onImage() {
//            var options = {
//                // 规定把请求发送到那个URL
//                url: "/doUpdateImg",
//                // 请求方式
//                type: "post",
//                // 服务器响应的数据类型
//                dataType: "json",
//                // 请求成功时执行的回调函数
//                success: function(data, status, xhr) {
//                    // 图片显示地址
//                    $("#showimg").attr("src", data.path);
//                }
//            };
//
//            $("#deptForm").ajaxSubmit(options);
//     }

	</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr><td height="10"></td></tr>
  <tr>
    <td width="15" height="32"><img src="${ctx}/images/main_locleft.gif" width="15" height="32"></td>
	<td class="main_locbg font2"><img src="${ctx}/images/pointer.gif">&nbsp;&nbsp;&nbsp;当前位置：部门管理  &gt; 修改部门</td>
	<td width="15" height="32"><img src="${ctx}/images/main_locright.gif" width="15" height="32"></td>
  </tr>
</table>
<table width="100%" height="90%" border="0" cellpadding="5" cellspacing="0" class="main_tabbor">
  <tr valign="top">
    <td>
    	 <form action="/doUpdateOrg" id="deptForm" method="post" enctype="multipart/form-data">
    	 	<!-- 隐藏表单，flag表示添加标记 -->
    	 	<%--<input type="hidden" name="flag" value="2">--%>
    	 	<input type="hidden" name="id" value="${org.id}">
		  <table width="100%" border="0" cellpadding="0" cellspacing="10" class="main_tab">
		    <tr><td class="font3 fftd">
		    	<table>
					<tr>
						<td class="font3 fftd">机构名称：<input type="text" name="name" id="name" size="20" value="${org.name}"/></td>
					</tr>
					<tr>
						<td class="font3 fftd">机构图片：<input type="file" name="file" id="file" accept="image/jpeg"></td>
						<td><img src="${org.image}" id="showImg" width="100px" height="80px"> </td>
					</tr>
					<tr>
						<td class="font3 fftd">机构地址：<input type="text" name="address" id="address" value="${org.address}"/></td>
					</tr>
					<tr>
						<td class="font3 fftd">所在城市：
							<select name="city_id" id="city" style="width:143px;">
								<option value="${org.city.id}">${org.city.name}</option>
								<c:forEach items="${citys}" var="city">
									<option value="${city.id}">${city.name }</option>
								</c:forEach>
							</select>
						</td>
					</tr>
					<tr>
						<td class="font3 fftd">机构类别：
							<select name="ct" style="width:143px;">
								<option value="${org.ct}">
									<c:if test="${org.ct=='gx'}">高校</c:if>
									<c:if test="${org.ct=='gr'}">个人</c:if>
									<c:if test="${org.ct=='pxjg'}">培训机构</c:if>
								</option>
								<option value="pxjg">培训机构</option>
								<option value="gx">高校</option>
								<option value="gr">个人</option>
							</select>
						</td>
					</tr>
					<tr>
						<td class="font3 fftd">机构简介：
							<textarea rows="5" cols="30" name="descr" id="descr">${org.descr}</textarea>
						</td>
					</tr>

		    	</table>
		    </td></tr>
			<tr><td class="main_tdbor"></td></tr>

			<tr><td align="left" class="fftd"><input type="submit" value="修改">&nbsp;&nbsp;<input type="reset" value="取消 "></td></tr>
		  </table>
		 </form>
		<form action="/doUpdateImg" method="post" id="favForm" enctype="multipart/form-data">

		</form>
	</td>
  </tr>
</table>
<table>

</table>
<div style="height:10px;"></div>
</body>
</html>